package com.onpositive.data.serializer.readers;

import java.io.FileDescriptor;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;

import com.onpositive.data.ISeekableAccess;

public class RandomAccessFileAccess implements ISeekableAccess{

	RandomAccessFile file;

	public RandomAccessFileAccess(RandomAccessFile file) {
		super();
		this.file = file;
	}

	public void close() throws IOException {
		file.close();
	}

	public boolean equals(Object arg0) {
		return file.equals(arg0);
	}

	public final FileChannel getChannel() {
		return file.getChannel();
	}

	public final FileDescriptor getFD() throws IOException {
		return file.getFD();
	}

	public long getFilePointer() throws IOException {
		return file.getFilePointer();
	}

	public int hashCode() {
		return file.hashCode();
	}

	public long length() throws IOException {
		return file.length();
	}

	public int read() throws IOException {
		return file.read();
	}

	public void read(byte[] arg0, int offset, int length) throws IOException {
		file.read(arg0, offset, length);
	}

	public int read(byte[] arg0) throws IOException {
		return file.read(arg0);
	}

	public final boolean readBoolean() throws IOException {
		return file.readBoolean();
	}

	public final byte readByte() throws IOException {
		return file.readByte();
	}

	public final char readChar() throws IOException {
		return file.readChar();
	}

	public final double readDouble() throws IOException {
		return file.readDouble();
	}

	public final float readFloat() throws IOException {
		return file.readFloat();
	}

	public final void readFully(byte[] arg0, int arg1, int arg2)
			throws IOException {
		file.readFully(arg0, arg1, arg2);
	}

	public final void readFully(byte[] arg0) throws IOException {
		file.readFully(arg0);
	}

	public final int readInt() throws IOException {
		return file.readInt();
	}

	public final String readLine() throws IOException {
		return file.readLine();
	}

	public final long readLong() throws IOException {
		return file.readLong();
	}

	public final short readShort() throws IOException {
		return file.readShort();
	}

	public final String readUTF() throws IOException {
		return file.readUTF();
	}

	public final int readUnsignedByte() throws IOException {
		return file.readUnsignedByte();
	}

	public final int readUnsignedShort() throws IOException {
		return file.readUnsignedShort();
	}

	public void seek(long arg0) throws IOException {
		file.seek(arg0);
	}

	public void setLength(long arg0) throws IOException {
		file.setLength(arg0);
	}

	public int skipBytes(int arg0) throws IOException {
		return file.skipBytes(arg0);
	}

	public String toString() {
		return file.toString();
	}

	public void write(byte[] arg0, int arg1, int arg2) throws IOException {
		file.write(arg0, arg1, arg2);
	}

	public void write(byte[] arg0) throws IOException {
		file.write(arg0);
	}

	public void write(int arg0) throws IOException {
		file.write(arg0);
	}

	public final void writeBoolean(boolean arg0) throws IOException {
		file.writeBoolean(arg0);
	}

	public final void writeByte(int arg0) throws IOException {
		file.writeByte(arg0);
	}

	public final void writeBytes(String arg0) throws IOException {
		file.writeBytes(arg0);
	}

	public final void writeChar(int arg0) throws IOException {
		file.writeChar(arg0);
	}

	public final void writeChars(String arg0) throws IOException {
		file.writeChars(arg0);
	}

	public final void writeDouble(double arg0) throws IOException {
		file.writeDouble(arg0);
	}

	public final void writeFloat(float arg0) throws IOException {
		file.writeFloat(arg0);
	}

	public final void writeInt(int arg0) throws IOException {
		file.writeInt(arg0);
	}

	public final void writeLong(long arg0) throws IOException {
		file.writeLong(arg0);
	}

	public final void writeShort(int arg0) throws IOException {
		file.writeShort(arg0);
	}

	public final void writeUTF(String arg0) throws IOException {
		file.writeUTF(arg0);
	}

	@Override
	public void seek(int intSize) throws IOException {
		file.seek(intSize);
	}
}
